#pragma once

#include <map>
#include <mutex>
#include <shared_mutex>

#define EXP_API __declspec(dllexport)

namespace mztool {
    template<typename _Key, typename _Val>
    class EXP_API ConMap {
        public:
            ConMap() {}
            
            ~ConMap() {}

            void Put(_Key key, _Val val);

            bool Get(_Key key, _Val& val);

            int Size();

        private:
            std::map<_Key, _Val> m_data;
            std::shared_mutex m_mutex;
    };

}
